import {mapActions, mapGetters} from 'vuex';
//import api from 'api';

export default {
  data () {
    return {
      lang: this.$i18n.locale, // 当前语言
      menuList: [  {
        "menuId": "myTestDB_2",
        "menuNameCn":"我的题库管理",

        "iconCls": "el-icon-location",
        "children":[ {
          "menuId": "myTestDB_22",
          "menuNameCn":"题库列表",
         
          "iconCls": "el-icon-location",
          "children":[],
          "comp":"myTestDBList",
          "url":"/myTestDBList"
        },  
        {
           "menuId": "myTestDB_21",
           "menuNameCn":"创建题库",     
           "iconCls": "el-icon-location",
           "children":[],
           "comp":"createmyTestDB",
           "url":"/createmyTestDB"
         },{
          "menuId": "myTestDB_23",
          "menuNameCn":"题库分类列表",     
          "iconCls": "el-icon-location",
          "children":[],
          "comp":"myTestDBcate",
          "url":"/myTestDBcate"
        },
      ],
        "comp":"",
        "url":""
      },{
        "menuId": "myTestDB_1",
        "menuNameCn":"试卷管理",

        "iconCls": "el-icon-location",
        "children":[{
          "menuId": "myTestDB_12",
          "menuNameCn":"我的试卷列表",
         
          "iconCls": "el-icon-location",
          "children":[],
          "comp":"paperList",
          "url":"/paperList"
        },
        {
          "menuId": "myTestDB_13",
          "menuNameCn":"创建试卷",     
          "iconCls": "el-icon-location",
          "children":[],
          "comp":"createPaper",
          "url":"/createPaper"
        },
          {
            "menuId": "myTestDB_11",
            "menuNameCn":"试卷分类列表",     
            "iconCls": "el-icon-location",
            "children":[],
            "comp":"paperCate",
            "url":"/paperCate"
          },
          {
            "menuId": "myTestDB_11",
            "menuNameCn":"大题题名编辑",     
            "iconCls": "el-icon-location",
            "children":[],
            "comp":"paperQuestionName",
            "url":"/paperQuestionName"
          }
      ],
        "comp":"",
        "url":""
      },
    
      ],
      showMenuFlag: true, // 是否展示菜单
      isCollapse: false // 是否折叠菜单

    };
  },
  mounted () {
    this.$Progress.start(); // 显示进度条 http://hilongjw.github.io/vue-progressbar/index.html
    // api.getSysMenuList().then((res) => {
    //   this.menuList = res.data;
      this.$Progress.finish();
    // });
  },
  methods: {
    ...mapActions([ // https://vuex.vuejs.org/zh-cn/actions.html
      'TestDBAddTab',
      'TestDBRemoveTab',
      'TestDBClickTab'
    ])
  },
  computed: {
    ...mapGetters([ // https://vuex.vuejs.org/zh-cn/getters.html
      'getMyTestDBCurrentTab',
      'getTestDBTabs'
    ])
  },
  components: {
    myTestDBcate: () => import('views/MyTestDB/MyTestDBManage/myTestDBcate.vue'),
    myTestDBList: () => import('views/MyTestDB/MyTestDBManage/myTestDBList.vue'),
    createmyTestDB: () => import('views/MyTestDB/MyTestDBManage/createmyTestDB.vue'),
    paperCate: () => import('views/MyTestDB/paper/paperCate.vue'),
    paperList: () => import('views/MyTestDB/paper/paperList.vue'),
    createPaper: () => import('views/MyTestDB/paper/createPaper.vue'),
    paperQuestionName: () => import('views/MyTestDB/paper/paperQuestionName.vue'),
  }
};
